<div class="row animate fadeIn">
    <div class="ibox-title" style="border:none;"><h5 style="color: #00afef"><i>View</i></h5>
     </div>
     <div class="ibox-content">
        <form id="read_tasks_view" class="form-horizontal">
     <?php foreach($reads as $r): ?>
      <input type="hidden" value="<?php echo $r->task_id; ?>" name="task_id">
      <div class="form-group">
                <label class="col-xs-4 control-label">Tasks Name *</label>
                <div class="col-xs-5">
                    <input readonly type="text" class="form-control" value="<?php echo $r->task_name; ?>" name="task_name">
                </div>
             </div>
             <div class="form-group">
                <label class="col-xs-4 control-label">Zones *</label>
                <div class="col-xs-5">
                    <select disabled name="zone" class="form-control chosen" id="">
                        <option value="">--</option>
                        <?php foreach ($zones as $key): ?>
                            <option <?php echo ($r->zone == $key->zone_name ? 'selected':''); ?> value="<?php echo $key->zone_name; ?>"><?php echo $key->zone_name; ?></option>
                        <?php endforeach;?>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-4 control-label">Meter Reader *</label>
                <div class="col-xs-5">
                    <select disabled name="meter_reader" class="form-control chosen" id="">
                        <option value="">--</option>
                        <?php foreach ($meter_reader as $key): ?>
                            <option <?php echo ($r->reader_id == $key->user_id ? 'selected' : ''); ?> value="<?php echo $key->user_id; ?>"><?php echo $key->name; ?></option>
                        <?php endforeach;?>
                    </select>
                </div>
            </div>
            <div class="form-group">
              <label class="col-xs-4 control-label">Sequence: *</label>
              <div class="col-xs-5">
                <div class="input-group m-b">
                  <input readonly name="seq_from" type="text" placeholder="ex: 0" value="<?php echo $r->seq_from; ?>" class="form-control">
                  <span class="input-group-addon">-</span>
                  <input readonly name="seq_to" type="text" placeholder="ex: 1000" value="<?php echo $r->seq_to; ?>" class="form-control">
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="col-xs-4 control-label">Year-Month: *</label>
              <div class="col-xs-5">
                <div class="input-group m-b">
                  <select disabled name="year" class="form-control chosen">
                    <?php
                    $mon = array('','January','February','March','April','May','June','July','August','September','October','November','December');
                    for($i = date('Y'); $i >= 2010 ; $i--):?>
                      <option <?php echo ($r->month == $i ? 'selected' : ''); ?> value="<?php echo $i; ?>"><?php echo $i; ?></option>
                    <?php endfor; ?>
                  </select>
                  <span class="input-group-addon">-</span>
                   <select disabled name="month" class="form-control chosen">
                    <?php for($o = 1; $o <= 12; $o++):?>
                      <option <?php echo ($r->year == $o ? 'selected' : ''); ?> value="<?php echo $o < 10 ? '0'.$o : $o; ?>"><?php echo $mon[$o]; ?></option>
                    <?php endfor; ?>
                 </select>
                </div>
              </div>
            </div>
          <?php endforeach; ?>
        </form>
    </div>
    </div>
</div>
 <script>

 $(document).ready(function(){
  $('#viewX').click(function(){
           close_view();
        });
 });

 </script>